package com.example.admin.feign;

import com.example.admin.feign.impl.WmNewsFeignBack;
import com.usian.model.media.pojos.WmNews;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "leadnews-wemedia",fallback = WmNewsFeignBack.class)
public interface WmNewFeign {
    @GetMapping("wmnews/v1/get_wmnews_by_id")
    public WmNews getWmNewsById(@RequestParam Integer id);
    @PostMapping("wmmnews/v1/update_wmnews")
    public Integer updateWmNews(@RequestBody WmNews wmNews,@RequestParam Integer status);
    @GetMapping("/wmnews/v1/get_checked_wmnews")
    public List<WmNews> getCheckedWmnews();
    @PostMapping("wmnews/v1/update_wmnews")
    public Integer updateWmnews(@RequestBody WmNews wmNews);
    @GetMapping("wmnews/v1/get_name")
    String selectName(@RequestParam Integer userId);
}
